//% color="#9f32f1" iconWidth=40 iconHeight=30
namespace ws2812{


    //% block="RGB灯[NP]熄灭第[NUM]个灯" blockType="command"
    //% NP.shadow="normal"   NP.defl="np1"
    //% NUM.shadow="number"   NUM.defl="0"
    export function rgb(parameter: any, block: any) { 
        let NP = parameter.NP.code;
        let NUM = parameter.NUM.code;
        Generator.addCode(`${NP}[${NUM}] = (0,0,0)`)
        
   
   } 

    //% block="RGB灯[NP]熄灭灯号[NUM]到[NUM2]" blockType="command"
    //% NP.shadow="normal"   NP.defl="np1"
    //% NUM.shadow="number"   NUM.defl="0"
    //% NUM2.shadow="number"   NUM2.defl="4"
    export function rgb2(parameter: any, block: any) { 
        let NP = parameter.NP.code;
        let NUM = parameter.NUM.code;
        let NUM2 = parameter.NUM2.code;
        Generator.addCode(`${NP}.range_color(${NUM},${NUM2},0x000000)`)
        
   
   } 



}